package br.edu.fatec.ratoninja;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Window;

public class GameActivity extends Activity {

	private static final String TAG = "RatoNinja::GameActivity";
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(new GameView(this));
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		//System.out.println(keyCode);
		if (keyCode == 45) {
			Log.e(TAG, "Exit..");
			System.exit(0);
		}
		return super.onKeyDown(keyCode, event);
	}
}